conf = require("../config")
if not conf.hlchunk.enabled then return {} end

return {
  "shellRaining/hlchunk.nvim",
  event = { "UIEnter" },
  config = function ()

    -- filetypes of being supported
    local support_filetypes = {
      -- C/C++
      "*.c",
      "*.cpp",
      "*.h",
      -- verilog/system verilog
      "*.v",
      "*.sv",
      "*.svh",
      -- lua
      "*.lua",
      -- scala
      ".scala",
      ".sc",
    }

    require("hlchunk").setup({
      chunk = {
        enable = false,
        notify = true,
        Use_treesitter = true,
        chars = {
          horizontal_line = "─",
          vertical_line = "│",
          left_top = "╭",
          left_bottom = "╰",
          right_arrow = ">",
        },
        support_filetypes = support_filetypes,
        style = "#a7c080", -- everforest
      },

      indent = {
        chars = { "│", "¦", "┆", "┊", },
        enable = true,
        style = {
          vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID("Whitespace")), "fg", "gui")
          },
        },

      line_num = {
        enable = false,
        support_filetypes = support_filetypes,
        style = "#a7c080", -- everforest
      },

      blank = {
        enable = false,
      },
    })
  end,
}
